Electronic image acquistion system with image optimization by intensity entropy analysis and feedback control

ABSTRACT

An image acquisition system is arranged to optimize the information in an acquired image. Parameters associated with the system, such as any of the lens aperture, the lens focus and image intensity, are adjusted. Incoming image data is processed to determine the entropy of the image and with this information the aperture can be optimized. By determining the dynamic range of the scene the black and white levels thereof can be identified and the gain and offset applied to the image adjusted to minimize truncation distortion. Specular highlights can be detected by calculating the ratio of changes in maximum and minimum intensities between different but related images.

FIELD OF THE INVENTION

The invention relates to an image acquisition system.

BACKGROUND OF THE INVENTION

In the field of machine vision, extensive work has been carried out inresearching the interpretation of images acquired from an image sourcesuch as a video or other electronic camera. In many hitherto knownmachine vision systems the operation of the system has concentrated onthe processing of images acquired from a source without any interactionbetween the processor and the source. Thus, the system has operated inan essentially passive manner with the source parameters such as cameraaperture being adjusted independently from the processing on the basisof say the average light intensity of a scene.

In many circumstances adequate information can be obtained from apassive source by moving the viewing position and acquiring furtherimages representing different views of a scene. Indeed, multiple viewsof a scene are always required if three-dimensional information aboutthe scene is to be obtained. However, in adopting an essentially passiveapproach to image acquisition, information about a scene may be lost inan acquired image, thereby creating many problems which must be resolvedby image processing in order to obtain valid information from the image.

A passive source will not necessarily provide optimal images forinterpretation by the system. This is because for example sceneillumination varies widely between that of a sunny day when the scenewill contain high contrasts and that of a moonlit night. Typically,video image sources are arranged to respond to say the averageillumination of a scene or to the illumination at a point in the sceneand will thus supply very different images representing the same sceneunder these two extremes of illumination. Similarly, poor images may beacquired where objects in a scene have widely varying reflectance. Someobjects may have highly specular aspects (i.e. reflections of the lightsource illuminating the object) and others may be highly diffused innature (i.e. substantially no specular reflections). Whilst most scenesand most objects fall between these extremes there may still be problemswith for example specular reflections being interpreted as edges wherethere are in fact none and edges or other features not being detectedwhen they do in fact exist.

In order to overcome these difficulties image processing software hasbeen developed which makes various assumptions about a scene representedby an acquired image. One reason why this approach has been adopted isthat there is a belief commonly held by those in the art of machinevision that any viewing mechanism capable of being implemented can besimulated entirely by software. Whilst it is indeed possible toimplement many aspects of observation by way of software applied toimages acquired from an essentially passive source, this approach islimited in that it is difficult to remove false information such asspecular edges, or to replace missing information such as undetectededges in such an acquired image. This problem stems from the fact thatonce a poor image has been acquired it is difficult to transform it intoa good image from which scene information can be extracted.

SUMMARY OF THE INVENTION

The present invention resides in the realization that machine vision canbe optimized by providing interaction between the image source and theimage processing thereby providing an active image acquisition systemfrom which images containing optimum scene information can be obtained.To this end, the invention provides for interaction between an imageacquisition device, for example a camera, and an image processingdevice. In this way optimal images can be obtained for furtherprocessing without the need to make restrictive assumptions about thescene represented by the image.

Thus, the present invention resides in the realization that theextraction maximum information from a scene is the optimization ofphotometric properties of images acquired by an image source. Onceoptimal images have been acquired maximum information about a scene canbe extracted therefrom.

According to one aspect of the invention there is therefore provided amethod of controlling an image acquisition system to optimize theinformation in acquired image data, in which method parametersassociated with the system are adjusted and incoming image data isprocessed to calculate therefrom at least one value associated with theentropy of the image, the parameters being adjusted so that the valueassociated with the entropy tends toward an optimum value.

According to another aspect of the invention there is provided acontroller for an image acquisition system, the controller comprisingprocessing means for processing incoming image data to calculatetherefrom at least one value associated with the entropy of the image,and adjusting means for adjusting parameters associated with the systemto optimize said at least one value and thereby to optimize theinformation in the acquired image.

In a further aspect, the invention provides an image acquisition systemcomprising an image source from which image data is input to anamplifier having an adjustable gain and/or offset, the image data beingprocessed to calculate parameters from the entropy of image intensityvalues which parameters are used to control adjustment of either of thegain and/or offset of the amplifier thereby to adjust the response ofthe source to incoming images and to optimize the dynamic range in theacquired image data.

The invention also provides an image acquisition system comprising anelectronic camera having an associated amplifier and quantizer foroutputting digital data representing an acquired image, and a processorfor processing the digital data to calculate parameters which are usedto adjust the characteristics of either the camera or the amplifier orboth in order to optimize the amount of information in the acquiredimage.

Furthermore, the invention provides a method of detecting a specularhighlight in a scene, the method comprising acquiring a first imagerepresenting the scene by way of an image acquisition system set up inaccordance with first known parameters, acquiring a second imagerepresenting the scene by way of the acquisition system set up inaccordance with second known parameters, calculating the dynamic rangeof the first and second images and the ratio of the dynamic ranges, andcomparing intensity values in the scene with a reference value derivedfrom said ratio to identify a specular highlight as an intensity valueexceeding said reference.

Also, the invention provides an image acquisition system in which imagesare input from an image source comprising an amplifier having anadjustable gain and/or offset, the images being input as image datawhich is processed to calculate the intensity dynamic range in a firstimage from the source set up in accordance with first known parametersand in a second image set up in accordance with second known parameters,and data relating to the calculated dynamic ranges is used in theadjustment of the gain and/or offset of the amplifier thereby to adjustthe response of the source to incoming images to optimize information inthe acquired images.

The above and further features of the invention are set forth withparticularity in the appended claims and together with advantagesthereof will become clearer from consideration of the following detaileddescription of exemplary embodiments of the invention given withreference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a generalized schematic diagram of a system embodying theinvention;

FIG. 2 is a more detailed schematic diagram of the system of FIG. 1;

FIG. 3 is graphical representation of the transfer characteristics ofcomponents of the system of FIG. 2;

FIG. 4 is a schematic diagram of a color corrected circuit;

FIG. 5 is a graphical representation of the intensity gradientdistribution of an image;

FIG. 6a-6e shows various experimental results; and

FIG. 7 shows a histogram of intensity probabilities in a typicalacquired image.

DETAILED DESCRIPTION OF AN EMBODIMENT OF THE INVENTION

Referring now to FIG. 1 of the accompanying drawings, an imageacquisition system 1 comprises a video camera 2 or other electronicimage source responsive to light stimulus for providing image datarepresentative of a scene. The image data from the camera is input to adynamic range controller 3 which, as will become clearer from thefurther description that follows, is arranged to adjust the dynamicrange of the image data from the camera and to deliver the adjusted datafor further processing by any suitable image processing system.Generally, the dynamic range controller 3 is arranged to define themaximum and minimum limits of light intensity represented by the imagedata by offsetting these limits depending on the ambient lightconditions associated with the scene. Image data from the dynamic rangecontroller 3 is also input to an aperture controller 4 which controlsamong other things the aperture 5 of the camera lens thereby controllingthe amount of light falling on light sensors (not shown in FIG. 1) inthe camera 2. The system 1 thus provides for continuous closed loopadjustment of paramets associated with the camera 2 and the image dataoutput from the camera. It should be noted that the most significantpart of the adjustment of the system is provided by the data adaptationby the dynamic range controller 3 as will now be described in greaterdetail.

Turning now to FIG. 2 of the accompanying drawings the image acquisitionsystem 1 can be divided into an optical sub-system 6 and an electronicssub-system 7. The system 1 also comprises an image processing andinterpretation sub-system 14 which receives data from the electronicssub-system 7 and processes that data to extract scene informationtherefrom. The sub-system 14 may be any suitably configured dataprocessor capable of performing at least the calculations to bedescribed in greater detail hereinafter.

The optical sub-system 6 consists of a photodetector array 8 or CCD anda lens assembly 9 which includes focus and aperture controls 10,11. Themain components in the electronics sub-system are a video amplifier 12and an analog-to-digital converter ADC 13. Both sub-systems 6,7 areinvolved in the control and transformation of the dynamic range of theimage data representing a scene. For the purpose of explanation it willbe assumed that the transfer characteristics of the photodetector array8 and of the analog to digital converter 13 or quantizer are linear,though it should be noted that devices with non-linear characteristicsmay instead be used if required.

The focus control and aperture control are represented in FIG. 2 asappropriately labelled boxes 10,11. It will be appreciated by thoseskilled in the art that these controllers are responsive to the digitalimage data output from the ADC 13 and are in fact a suitably configuredprocessor or processors arranged to interpret the data from the ADC 13and in response thereto to output control signals for driving actuatorsassociated with the focusing and aperture setting of the lens 9. Controlof offset and gain parameters of the video amplifier 12 is similarlycontrolled by any well known processing arrangement suitably configured.

In the following, algorithms used in the processor 14, or indeed pluralprocessors, to control parameters of the system 1 in response to imagedata output from the ADC will be described. This control is donedynamically with parameters being continually updated to obtain optimumimage data from the system 1.

Considering first the optical sub-system 6, it can be shown that##EQU1## where I_(c) is the intensity of the image L is the luminance ofthe image, f is the aperture or f-number of the lens, m is themagnification factor of the lens expressed as the ratio of the image tolens distance over the lens to object distance, and α is the anglesubtended by the incident ray and the optical axis.

Usually m is very small because the object distance is much greater thanthe image distance. Assuming the field of view is small, the cosine termis approximately unity. I_(c) can then be approximated to L/4f². Theaperture is therefore the most significant parameter governing behaviorof the optical sub-system 6.

Turning briefly to the electronics sub-system, operation of the videoamplifier 12 can be controlled by controlling offset and amplificationor gain of the amplifier 12. In particular, the offset and amplificationcan be used to establish black and white reference levels which are usedto clamp the video signal thereby limiting the dynamic range of thesystem. Finally, the video signal output from the amplifier 12 isquantized and coded digitally by the ADC 13 and by selecting thequantization characteristics of the ADC 13 operation of the system canbe further altered.

The conversion process performed by the system 1 is representedgraphically in FIG. 3 of the accompanying drawings. Referring now toFIG. 3 of the drawings, the graph 15 in the first quadrant shows thetransfer characteristic of the optical sub-system 6 for two aperturesizes D1 and D2. The image is formed on the CCD 8 which converts lightintensity into an electrical signal I_(sensor). The electrical signalI_(sensor) (a voltage signal) is output to be processed by the videoamplifier 12. The transfer characteristic of the video amplifier 12 isshown by the graph 16 in the second quadrant for two different gainsettings G1 and G2. By adjusting the offset of the amplifier 12 andselecting an appropriate gain setting the dynamic range of theelectronics sub-system 7 can be altered to suit the ambient lightconditions of the scene. The graph 17 in the third quadrant depicts thequantization characteristic of the ADC 13. A linear characteristic iscommonly used but a non-linear characteristic may instead be used ifrequired.

For the purpose of explanation the system so far described has beenlimited to monochrome images. In practice it is often desirable to usecolor images and the system can be readily modified to operate on suchimages. As shown in FIG. 4 of the accompanying drawings, a separateamplifier Wr, Wg and Wb can be provided for each of the red, green andblue color components output from a color camera. It will be appreciatedthat these amplifiers each have associated gain and offset controllers(not shown) which adjust the parameters of each amplifier to correct theincoming color component signals R', G', B' to produce corrected colorcomponents R,G,B which are each output via respective ADC's to the imageprocessing and interpretation unit 14 for further processing andanalysis.

Any shade of grey, i.e. achromatic signal varying from back to white, isdefined as having equal amounts of energy in R, G and B. In order tosatisfy this requirement for different scene illuminants, a weightingfactor can be applied to each color channel. With reference to FIG. 4 ofthe accompanying drawings the uncorrected color inputs are R'G'B' andthe corrected outputs R,G,B are:

R=W_(r) R',

G=W_(g) G',

B=W_(b) B'.

Color correction or white balance adjustment can be effected througheither hardware or software. To this end, a fourth amplifier W_(y) isalso provided in the circuit shown in FIG. 4. The fourth amplifier W_(y)is driven by the summation of the RGB signals to provide a signal Yrepresenting the luminance of the scene. As will be appreciated from thediscussion regarding specular reflections that follows hereinafter, thespectral of a specular reflection can be defined as the standard whitevalue of a scene. This is because the spectral of a specular reflectionis essentially that of the light source illuminating the scene. Once thespectral of the light source has been determined, in a manner to bedescribed in greater detail hereinafter, it can be compared to the valueof Y output from the amplifier W_(y) and the gain and offset of each ofthe other amplifiers W_(r), W_(g), W_(b) can be adjusted to obtain avalue of Y that corresponds to that of the source illuminating thescene. In practice this can be done by adjusting the gain of eachamplifier such that:

    W.sub.r R'.sub.s =W.sub.g G'.sub.s =W.sub.b B'.sub.s =1/3 Y

In other words, each corrected color is normalized to one third of thetotal luminance Y. Without loss of generality, Y is further normalizedto unity to give, ##EQU2##

It will be appreciated therefore that the above discussed algorithms areapplied to the image luminance signal y output from its respective ADC13 to the image processing unit 14 and the results thereof can be usedto adjust the setting of the aperture of the lens 9, and the gain andoffset of the amplifier 12 to optimize the information content of andacquired color image.

There are two parameters that in general define image quality namelyfidelity and intelligibility. Although much work has been done on thedevelopment and assessment of quantitative measures of gray level imagequality, little work has been done to relate image fidelity andintelligibility to the performance of the image acquisition system inthe recovery of the scene's intensity dynamic range. In other words,quality should be measured in terms of the goodness of intensityadaptation in optimizing contrast sensitivity and in reducing dynamicrange distortion.

In hitherto known systems control of the aperture has relied on the meanvalue of the image intensity which is adjusted to the mean value of theimage acquisition system dynamic range. This is unsatisfactory for thepurpose of image processing because the abovementioned two competingaspects of quality are not considered. Manual aperture adjustment isalso unsatisfactory because it is subjective and highly dependent on thedevice used to display the image, e.g. a display monitor.

An optimum digital image must preserve the dynamic range of a scene inorder to achieve high fidelity. On the other hand, it must also achievehigh intelligibility in terms of carrying maximum image informationusing the limited number of bits of information available to the system.These two requirements are usually in conflict. A real scene (e.g. anatural scene) may have an extremely large dynamic range, and if thisrange is to be completely covered it will be poorly represented by asmall number of bits per pixel. To solve the conflicting requirementsnew criteria are needed for controlling the camera aperture and thevideo signal offset and gain (black/white reference). In this way, thecriteria will control the intensity dynamic range of the recoveredinformation.

The operation of the system as so far described has assumed that thescene is composed of objects having a substantially even and finiterange of reflectivities. In reality, a scene may comprise a wide rangeof different objects with widely different reflectivities andorientations. The two extremes of reflectance are Lambertian where lightis reflected from a diffuse surface and is therefore in itself diffuse,and specular where light is reflected from a shiny surface and istherefore substantially an image of the light source. Since mostmaterials have a reflectance which lies between the two extremes ofLambertian and specular it is realistic to model any reflection by a sumof specular and Lambertian components. Lambertian reflection, also knownas or body reflection, depends only on the surface geometry of theobject and the light source direction, and is independent of the viewingdirection. Specular reflection is not only dependent on the angle of theincidence light and the surface orientation, but is also dependent uponthe viewing angle. For certain materials at certain viewing angles, thereflection due to the specular component dominates over the diffusecomponent and this shows up on the acquired image as a very brightregion which is called a specular highlight.

Most computer vision algorithms assume a Lambertian reflectance forobject surface. Specular highlights, when they occur, occupy only arelatively small area of an image. The presence of specular highlightmay be seen as a form of discontinuity in the Lambertian assumptionwhich is analogous to a depth discontinuity in the assumed smoothness inthe scene. In very much the same way as detecting discontinuities andapplying the smoothness assumption piecewise, a specular highlight hasto be located in the image and the Lambertian assumption appliedelsewhere. The advantage of having a specular highlight region detectedis that separate algorithms which do not depend on Lambertianassumptions can then be applied to these areas.

Most previous detection methods can be classified as passive. Theobvious advantage of passive detection is that analysis is performeddirectly on whatever image has already been captured. The disadvantageis that the photodetector array or CCD 8 may be saturated by the stronghighlight intensity and there is no means of controlling this adverseeffect. Whenever a scene has a specular reflection, the scene intensitydynamic range tends to be very large. The specular reflection intensitycan usually saturate most image sensors and consequently this willdistort the spectral content of the image. If saturation occurs, it isimpossible to recover the illuminant spectral even though the specularreflection can be detected.

One known method of detecting specular reflections by using Lambertianconstraints is that developed by Breslaff and Blake. The Breslaff andBlake method identifies specular reflections as those regions whereLambertian assumptions are violated. The Breslaff/Blake Lambertianconstraint is based on the argument that the strength of specularitydeviates from the Lambertian model by more than a factor of say 30 (afactor of 3 for illumination dynamic range and a factor of 10 formaterial albedo variation).

The present invention makes use of the Breslaff/Blake Lambertianconstraint. A technique of measuring the scene dynamic range is alsoused to make use of the Lambertian constraint. As will become clearerfrom the following description this method also requires active controlof the camera aperture and the black/white references so that truncationdistortion, i.e. underexposure and saturation, can be prevented and theilluminant color can be correctly estimated.

A specular reflection has different characteristics to that of anon-specular reflection because a non-specular reflection and isapparent locally as well as globally. Since a specular patch is areflection of a point source, the major differences that distinguish aspecular reflection in terms of local characteristics are that:

1) its color is no longer the same as the surface color, assuming thatthe color of the light source is different from the color of thespecular reflection;

2) its intensity is very much stronger than intensity in theneighborhood of the reflection which means that there is a high localcontrast; and

3) the focal distance of a specular highlight or reflection is greaterthan the distance to the surface and when the focus is adjusted beyondthe distance of the surface, the intensity of the specular reflectionwill appear to be intensified (Like a mirror surface where the reflectedimage is twice the object distance).

In terms of global characteristics, the global contrast and dynamicrange of a scene including specular reflections or highlights will tendto be very large. The dynamic range of a scene will be very large ifthere are specular reflections and shadow regions. It can be shown thatthe dynamic range of a scene can be defined by the equation: ##EQU3##

Where

S_(p) =point source high intensity

S_(a) =ambient source high intensity

P=specular coefficient

The dynamic range of a scene is therefore dependent on the scene.

Since the above dynamic range expression is derived for a point source,it can be shown that an extended light source having the same spectraldistribution can be approximated to a point source.

However, it has been pointed out that contrast is important in theperception of a light source and similarly of a highlight.Unfortunately, the two important factors crucial to highlight detection,namely the contrast and the dynamic range of a scene, as opposed to thatof the acquired image, cannot be measured directly from image intensity.More specifically, the contrast and the dynamic range of a scene cannotbe determined correctly by the intensity of a single image.

Before continuing, a distinction between luminance and image intensityshould be made. Luminance is the photometric intensity of a scene beforean image is subjected to transformation by an image acquisition system.Image intensity, in a practical sense, is the digitized datarepresenting the image, which data can be manipulated by the softwaredirectly. Because the scene contrast (Γ) and dynamic range (n) aredesired, they should be measured in terms of luminance (L) rather thanimage intensity (Y). It can be shown that ##EQU4##

Where L₁ and L₂ are the scene luminance values of proximate pixels in alocalized area of the image and L_(max) and L_(min) are the maximum andminimum luminance values in the whole image.

Luminance L cannot be measured directly from an acquired image. However,the image intensity Y can be measured and is related to the sceneluminance L by an approximately linear model equation:

    Y=AL+L.sub.off

Where A is the gain of the amplifier or amplifiers 12 and L_(off) is theoffset.

Again it can be shown that ##EQU5##

Where ΔY is the change in intensity between two different gain settingsof the amplifier 12.

Thus, the dynamic range n of the scene can be measured as a ratio ofintensities in two captured images and can be used to adjust the cameraparameters to obtain an optimum image. Once the scene dynamic range nhas been measured, specular highlights can be detected in the imageusing the Breslaff and Blake Lambertian constraint such that

n>30 Presence of highlight;

n±30 No highlight.

The location of a highlight in an image is obtained throughthresholding. A threshold value, T_(s), is determined from histogramanalysis. As shown in FIG. 7 of the accompanying drawings, an intensityhistogram is divided by the threshold value T_(s) into two distinctclusters corresponding respectively to the Lambertian and the highlightregions. The Lambertian surfaces occupy the lower intensity value andthis is the major cluster. The higher intensity cluster is due tospecular highlights.

The effects of highlights is detrimental to almost every type of stereomatching algorithm, be it feature, intensity or structure based.Specular highlights not only suppress the body color which is thedesired color, but also create view-point dependent primitives such asblobs and edges whose positions change with the viewing direction. Theelimination of highlights is equivalent to the elimination of theseview-point dependent primitives and can be used to prevent falsecandidate information and false matching.

Locating specular highlights can lead to the avoidance of false matchingin stereoscopic processing, and other algorithms have also beendeveloped to process and extract valuable information, such asretrieving the geometry of the area within the neighborhood of thespecular highlight.

The usefulness of detecting specular reflection can be extended toestimating the illuminant spectral distribution of the light source andcan be used subsequently for white balance adjustment. If the whitebalance can be adjusted automatically whenever a highlight is present ina scene, then the image acquisition system can be said to have beenimparted with the capability of providing consistent color to someextent.

The system can thus be further refined by first estimating the spectraldistribution of the light source illumination in the scene and thencorrecting for color by adjusting the white balance. It is well knowthat the color of the brightest region in a scene can be used to producea true criterion for judging the darker objects in the neighborhood ofthe brightest region. In essence, the retrieving of the color ofhighlights can be used to achieve color-constancy.

Specular reflection occurs as a result of near total reflection of theincident light where the material body reflectance has been almostexcluded. The near perfect case of specular reflection is a mirror.Generally, a specular reflection will attentuate the incident lightslightly but will retain the spectral distribution of the incidentlight. Detecting the specular reflection of a scene means that theilluminant spectral can be determined.

The intensity of a specular patch can be expressed in terms ofwavelength (k) as

I(k)=S_(p) (k)*P_(s),

where S_(p) =point source light intensity

and P_(s) =specular coefficient.

It should be noted that P_(s) does not depend on wavelength since bodypigment absorption does not take place and all spectral components areequally reflected.

For a standard color imaging sensor with three spectral sensitivechannels, r(k), g(k) and b(k): the tristimuli RG and B components can bedefined as

R=∫_(v) S_(p) (k)*P_(s) *r(k) dk

G=∫_(v) S_(p) (k)*P_(s) *g(k) dk

B=∫_(v) S_(p) (k)*P_(s) *b(k) dk,

where v denotes the visible spectrum.

The light source spectral distribution can be better grasped byexamining the ratios R'_(s), G'_(s), B'_(s) of tristimuli components ofthe source R_(s), G_(s), B_(s) where the multiplicative factor P_(s) iscancelled out. These ratios can be derived from the above equation andcan be shown to be: ##EQU6##

All ratios are normalized by the highest value and once the ratios havebeen obtained they can be used to correct for color in the acquiredimage.

Many techniques are known for adjusting the dynamic range of an acquiredimage in order to enhance a poorly captured image. One such technique isknown as histogram equalization in which the form of a histogramrepresenting the grey levels of the captured image is adjusted toconform with a predetermined shape. There are however two majordisadvantages with histogram equalization. First, since histogramequlization is a non-linear point to point mapping of the pixel graylevel, it causes distortion in the original image. Secondly, histogramequalization does not necessarily increase the entropy of the imagebecause the histogram equalized image has at most the same number ofdiscrete gray levels as the original image. When the total number ofgray levels is small, equalization will cause entropy to decreasebecause different output gray levels can be grouped into the same outputgray level. The histogram equalization technique is more suitable forimage enhancement for human visual interpretation than it is for use inmachine perception.

In the present system histogram equalization is not used and instead, aswill now be described in greater detail, the parameters of the cameraare adjusted dynamically to acquire an image with the equivalent tomaximum entropy.

A good digital image should preserve the scene characteristics in termsof contrast, shading and intensity discontinues. High contrastsensitivity is desirable in order that smaller intensity increments canbe detected. Intensity discontinuities and shading information arenotably amongst the most important attributes in an image. Theseattributes are represented by the intensity gradient partial derivativesIx, Iy, (shading information and intensity discontinuities can berepresented by intensity partial derivatives, I_(x), I_(y)) and by otherhigher order terms, as will be discussed in greater detail hereinafter.The aim therefore is to maximize the information content of absolute andderivative distributions.

A gray level histogram can provide a global description of the imageintensity distribution over the effective dynamic range of the system.Entropy is a measure of the information content of an image and can becalculated from the gray level histogram in accordance with the equation##EQU7##

Where H_(n) is the entropy of the histogram n is the number of graylevels and p_(i) is the posterior probability of the i^(th) gray leveloccurring in the image. P_(i) is calculated in accordance with theequation

    P.sub.i =f.sub.i /N,

where f_(i) is the frequency of i^(th) gray level in the image, and N isthe total number of pixels in the image.

Maximum entropy occurs for a uniformly distributed intensity histogram.In this case the probability of each intensity level occurring isidentical and it can be shown that H_(max) =log₂ (n).

In practice it is unlikely that a real scene will ever have a flat greylevel histogram and so, instead of searching for the maximum entropyH_(max), an equivalent but more computationally efficient approach is tolocate the minimum variance from a flat histogram. In this approach aflat histogram is used as a reference and since its mean frequency μ_(h)is a constant, i.e. μ_(h) =N/n the variance of the image histogram willbe: ##EQU8##

In order to calculate the entropy H_(g) of the intensity gradient it isonly necessary to use the gradient magnitude, g.

    g=(I.sub.x.sup.2 +I.sub.y.sup.2).sup.1/2

where the intensity partial derivatives I_(x) and I_(y) are ##EQU9##

The gradient magnitude distribution spans a range from 0 to m levels,where m is the integer part of √2 n. Therefore, ##EQU10## where P_(g) isthe gradient probability, and P_(g) =f_(g) /N.

The reason for maximizing the information content of the magnitude ofgradient distribution can be best justified by examining the physicalcontent which this distribution carries. The magnitude of gradientdistribution in an image is known to be approximately a Rayleighdistribution 18 as shown in FIG. 5 of the accompanying drawings.Referring to FIG. 5, the lower portion 19 of the distribution 18,including the peak, is mainly due to noise. The central part 20 of thedistribution is contributed by shading in the image and the higher end21 of the distribution corresponds to edges in the image. Therefore,maximizing the entropy of the magnitude of gradient distribution willalso maximize the information content of shading and edges in the imageassuming that the noise has a stationary white Gaussian distribution.

The abovementioned combined criteria require that the optimum aperturef_(opt) of the acquired image will be such as to maximize both H_(n) andH_(g). i.e. f_(opt) is a function of max (H_(n) +H_(g)). (4)

In practice the above objective functions (1) to (4) are evaluatedexperimentally. It has been found that the intensity and gradiententropies H_(n) and H_(g) are correlated and this results in a reductionof the computational effort associated with the functions becausemaximizing the intensity entropy H_(n) will also maximize the gradiententropy H_(g).

It should be noted an advantage in adopting this approach is thatfocusing of the camera can be controlled in relation to the gradientmagnitude g. Thus, by arranging the focus control 10 in FIG. 2 toreceive the values of gradient magnitude g from the processing unit 14such that by summing all values of g and adjusting the position of thelens to maximize the summation, the focus control 10 can control thecamera such that the camera will be in focus when the maximum summationis found.

Typical entropy experimental results are illustrated in FIG. 6 of theaccompanying drawings. These results were obtained for five differentscenes, varying from an artifical scene comprising a single object atclose range to a natural scene. Each of the graphs in FIG. 6 show asseparate plots intensity entropy H_(n), gradient entropy H_(g), thecombination of gradient and intensity entropy and the variance σ_(h) ².FIG. 6 shows the four criteria for (a) a natural scene, (b) a singlematt object, (c) a single specular object, (d) a mixture of differentobjects, and (e) a textured surface. In each case where an arrow isshown on the horizontal axis the arrow indicates the f-number that wouldbe selected using conventional methods. In the case of graph (b) and (c)the conventionally selected f-number would be outside of the operatingrange and accordingly no arrow is shown.

Since calculation of the minimum variance from a flat histogram requiresthe least computation to determine f_(opt) this is the preferred methodof calculating f_(opt), i.e. f_(opt) : min (σ_(h) ²). (5)

Under very poor illumination conditions, aperture control alone isineffective. The effectiveness of aperture control can be monitored bymeasuring the image entropy outlined in equation (1) above. An empiricalentropy threshold, ε, can be established such that (H_(n))_(max) >ε. Anoptimum aperture setting which fails to meet this expectation willindicate that the aperture control is inadequate. Such a situation couldbe overcome by active illumination of the scene by an external lightsource. However, the use of an external light source may be undesirableor impractical and in the absence of an external light source, analternative solution is to modify the dynamic range of the system bycontrolling the black and white references to match that of the scene.In practice this is again achieved by adjusting the gain and offset ofthe amplifier.

Returning to FIG. 3 of the drawings, it can be seen that by adjustingthe offset of the or each amplifier 12 the point at which the outputfrom the amplifier 12 is zero can be made to correspond to the minimumluminance Lmin of the scene. Similarly, by adjusting the gain G of theamplifier the maximum output of the amplifier can be made to correspondto the maximum scene luminance Lmax. In this way, the characteristics ofthe electronics sub-system can be adjusted to assume that the maximumnumber of quantization levels in the ADC 13 are utilized for a givendynamic range of scene luminance Lmin to Lmax.

Intensity truncation distortion, underexposure and saturation, can beassessed from the cumulative density of the image, which is defined as##EQU11##

On the probability histogram of the image, the probability density atthe black and white levels, i.e. 0 and n-1 levels, are not their truevalues. The probability densities for the 0 and n-1 levels measured fromthe histogram are denoted by p*(0) and p*(n-1), and thus their truevalues are

    p(0)=p*(0)-F(i<0), and

    p(n-1)=p*(n-1)-F(i>n),

where p(0) and p(n-1) are respectively the true probability densitiesfor the black and white levels of the acquired image and can beapproximated by the values of their neighbors based on the assumptionthat most histograms are smooth and continuous. Therefore,

p(0)≈p(1)

p(n-1)≈p(n-2).

The cumulative densities for the underexposed and saturated gray levelsare

    F(underexposure)=F(i<0)=p*(0)-p(1)

    F(saturation)=F(i>n)=p*(n-1)-p(n-2)

Therefore a control strategy for black/white reference is to limit theunderexposure and saturation to a pre-defined tolerance such that,

    0<F(underexposure)±ε.sub.u

    0<F(saturation)±ε.sub.g.                        (6)

The test for greater than 0 is to ensure that the lowest and highestlevels are occupied. Without this condition, even under-occupiedhistogram will pass the test. As an example if only 1% of the totalnumber of pixels is allowed to be truncated, then ε_(u) and ε_(g) shouldbe set to 0.005.

The results of an experiment in which the black and white referenceswere adjusted to improve the entropy as well as to reduce dynamic rangetruncation showed that the original histogram had a large proportion ofgray levels not occupied and the improved image had an entropy of 7.29bits/pixel which indicates an efficient utilization of the systemsdynamic range (8 bits). In this case the total truncation distortion wascontrolled to be under 0.3% and the effective dynamic range could belocated anywhere within the dynamic range of the photodetectors (itshould be noted that ultra-wide dynamic range charge-couple devices ofmore than 60 dB are available commercially).

The above described embodiment of the invention thus provides fordynamic adjustment of parameters associated with the image source inorder to obtain a digital image containing the maximum amount of usefulinformation about the scene represented by the image.

The invention can be applied to any image processing system in whichimages to be processed are acquired from an image capturing source andis not limited in application to machine vision or artificialintelligence systems.

Having thus described the present invention by reference to preferredembodiments it is to be well understood that the embodiments in questionare exemplary only and that modifications and variations such as willoccur to those possessed of appropriate knowledge and skills may be madewithout departure from the spirit and scope of the invention as setforth in the appended claims and equivalents thereof.

I claim:
 1. An image acquisition system comprising:(a) an electronic camera having a lens with a selectively adjustable aperture control: (b) an amplifier coupled to said camera to receive image data therefrom, said amplifier having selectively adjustable gain and offset controls; (c) a digitizer coupled to said amplifier to receive amplified image data therefrom; and (d) a processor coupled to said digitizer to receive digitized image data therefrom, said processor having outputs coupled to said amplifier gain and offset controls for selectively adjusting the same, and an output connected to said lens aperture control for selectively adjusting the same; (e) said processor being adapted to process said digitized image data received from said digitizer to calculate therefrom an intensity entropy of an image and, in response thereto, to provide outputs selectively to said amplifier gain and offset controls and said lens aperture control for selectively adjusting the same to optimize the acquired image information, said intensity entropy of said image being defined as H_(n), where: ##EQU12## and n=the number of quantized intensity levels of the digitizer, and P_(i) =the probability of the i^(th) intensity level occurring in the image and is defined by p_(i) =f_(i) /N where f is the frequency of occurrence of the i^(th) intensity level in the digitized image data and N is the total number of pixels in the digitized image data.
 2. An image acquisition system as claimed in claim 1, wherein said processor is adapted to derive a histogram of the image intensities in the digitized image data received from the digitizer and to calculate the intensity entropy H_(n) of the image from said histogram.
 3. An image acquisition system as claimed in claim 1, wherein said processor is further adapted to identify specular reflections in the digitized image and, in response thereto, to provide outputs selectively to said amplifier gain and offset controls and said lens aperture control for selectively adjusting the same.
 4. An image acquisition system as claimed in claim 3, wherein said processor is adapted to identify specular reflections as digitized image intensity values above a predefined intensity threshold.
 5. An image acquisition system as claimed in claim 4, wherein said processor is adapted to determine the dynamic range of the image by determining the ratio of image intensity changes in two captured images acquired under different settings of said amplifier gain and offset controls and said lens aperture control, and to determine said predetermined intensity threshold as a function of the determined dynamic range.
 6. An image acquisition system as claimed in claim 5, wherein said processor is adapted to determine said dynamic range from the maximum and the minimum intensity values in said two captured images.
 7. An image acquisition system as claimed in claim 3, wherein said processor is adapted to process image data associated with detected specular reflections to determine a color content thereof and, in response thereto, to normalize the color content of acquired images to compensate for color variations between images caused by changes in image illumination.
 8. An image acquisition system as claimed in any one of claims 1 to 7, wherein the lens of said electronic camera also has a selectively adjustable focus control, and said processor also has an output coupled to said focus control for selectively adjusting the same to optimize the acquired image information.
 9. An image acquisition system comprising:(a) an electronic camera having a lens with a selectively adjustable aperture control; (b) an amplifier coupled to said camera to receive image data therefrom, said amplifier having selectively adjustable gain and offset controls; (c) a digitizer coupled to said amplifier to receive amplified image data therefrom; and (d) a processor coupled to said digitizer to receive digitized image data therefrom, said processor having outputs connected to said amplifier gain and offset controls for selectively adjusting the same and an output connected to said lens aperture control for selectively adjusting the same; (e) said processor being adapted to process said digitized image data received from said digitizer to calculate therefrom an intensity gradient entropy of said image and, in response thereto, to provide outputs selectively to said amplifier gain and offset controls and said lens aperture control for selectively adjusting the same to optimize the acquired image information, the intensity gradient entropy of the image being defined as H_(g), where: ##EQU13## and the intensity gradient magnitude being defined as g, where:

    g=(I.sub.x.sup.2 +I.sub.y.sup.2).sup.1/2

and the intensity partial derivatives I_(x) and I_(y) are ##EQU14## and m=the number of levels spanned by the gradient magnitude distribution of the quantized intensity levels of the digitizer; and p_(g) =the probability of the g^(th) intensity gradient level occurring in the image and is defined by p_(g) =F_(g) /N, where f_(g) is the frequency of occurrence of the g^(th) intensity gradient level in the digitized image data and N is the total number of pixels in the digitized image data.
 10. An image acquisition system as claimed in claim 9, wherein said processor is adapted to derive a histogram of the image intensities in the digitized image data received from the digitizer and to calculate the intensity gradient entropy Hg of the image from said histogram.
 11. An image acquisition system as claimed in claim 9, wherein said processor is further adapted to identify specular reflections in the digitized image and, in response thereto, to provide output selectively to said amplifier gain and offset controls and said lens aperture control for selectively adjusting the same.
 12. An image acquisition system as claimed in claim 11, wherein said processor is adapted to identify specular reflections as digitized image intensity values above a predetermined intensity threshold.
 13. An image acquisition system as claimed in claim 12, wherein said processor is adapted to determine the dynamic range of the image by determining the ratio of image intensity changes in two captured images acquired under different settings of said amplifier gain and offset controls and said lens aperture controls and to determine said predetermined intensity threshold as a function of the determined dynamic range.
 14. An image acquisition system as claimed in claim 13, wherein said processor is adapted to determine said dynamic range from maximum and minimum intensity values in said two captured images.
 15. An image acquisition system as claimed in claim 11, wherein said processor is adapted to process image data associated with detected specular reflections to determine a color content thereof and, in response thereto, to normalize the color content of acquired images to compensate for color variations between images caused by changes in image illumination.
 16. An image acquisition system as claimed in any one of claims 9 to 15, wherein the lens of said electronic camera also has a selectively adjustable focus control, and said processor also has an output coupled to said focus control for selectively adjusting the same to optimize the acquired image information.
 17. An image acquisition system comprising:(a) an electronic camera having a lens with a selectively adjustable aperture control; (b) an amplifier coupled to said camera to receive image data therefrom, said amplifier having selectively adjustable gain and offset controls; (c) a digitizer coupled to said amplifier to receive amplified image data therefrom; and (d) a processor coupled to said digitizer to receive digitized image data therefrom, said processor having outputs connected to said amplifier gain and offset controls for selectively adjusting the same, and an output connected to said lens aperture control for selectively adjusting the same; (e) said processor being adapted to process said digitized image data received from said digitizer to derive a histogram of the image intensities in said digitized image data and to calculate therefrom the variance of the image intensities from a reference histogram and, in response thereto, to provide outputs selectively to said amplifier gain and offset controls and said lens aperture control for selectively adjusting the same to optimize the acquired image information, said variance being defined as σ_(h) ², where ##EQU15## and n=the number of quantized intensity levels of the digitizer f_(i) -the frequency of occurrence of the i^(th) intensity level in the digitized image data, and μ_(h) =N/n, where N is the total number of pixels in the digitized image data.
 18. An image acquisition system as claimed in claim 17, wherein said processor is further adapted to identify specular reflections in the digitized image and, in response thereto, to provide outputs selectively to said amplifier gain and offset controls and said lens aperture control for selectively adjusting the same.
 19. An image acquisition system as claimed in claim 18, wherein said processor is adapted to identify specular reflections as digitized image intensity values above a predefined intensity threshold.
 20. An image acquisition system as claimed in claim 19, wherein said processor is adapted to determine the dynamic range of the image by determining the ratio of image intensity changes in two captured images acquired under different settings of said amplifier gain and offset controls and said lens aperture control, and to determine said predetermined intensity threshold as a function of the determined dynamic range.
 21. An image acquisition system as claimed in claim 20, wherein said processor is adapted to determine said dynamic range from maximum and minimum intensity values in two captured images.
 22. An image acquisition system as claimed in claim 18, wherein said processor is adapted to process image data associated with detected specular reflections to determine a color content thereof and, in response thereto, to normalize the color content of acquired images to compensate for color variations between images caused by changes in image illumination.
 23. An image acquisition system as claimed in any one of claims 17 to 22, wherein the lens of said electronic camera also has a selectively adjustable focus control, and said processor also has an output coupled to said focus control for selectively adjusting the same to optimize the acquired image information. 